<?php


namespace app\admin\model;

use think\Db;
/**
 * 查询构建器 find() select()
 * ORM get() all()
 */
class Admin extends BaseModel
{
    public function roles()
    {
        return $this->belongsToMany('Role', 'admin_role', 'role_id', 'admin_id');
    }

    public function rol()
    {
        return $this->hasMany('AdminRole', 'admin_id', 'id');
    }
}